<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>YouTube_Confirm</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
	<h3 id="textTip">认证成功</h3>
</body>
<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	$(function() {
		var local_url = window.location.search;
		var local_arr = local_url.split("&");
		var length_local = local_arr.length;
		var state, code, error, params;
		if(length_local <= 2) {
			$("#textTip").html("您已取消认证");
			error = local_arr[0].split("=")[1];
			params = {
				"error":error
			}
		}else if(length_local == 3){
			$("#textTip").html("您已认证成功");
			state = local_arr[0].split("=")[1];
			code = local_arr[1].split("=")[1];
			params = {
				"state":state,
				"code":code
			}
		}
		window.opener.postMessage(JSON.stringify(params),"*");
		// window.opener.postMessage(JSON.stringify(params),"tvunetworks.com");
	});
</script>
</html>